<?php
namespace Hive\Contact\Interview;
/**
 * Type of Interview.
 *
 * It represant the type of a status to be used in the contact workflow
 *
 * @author Xavier VILAIN
 * @package Hive\Contact\Interview
 *
 * @property string	$type			Id of the type
 * @property string	$language		Language
 * @property string	$label			Label
 */
class Type  extends \Fox\Object\Versioned\Customizing {

	/**
	 * Reverse Link to Sources
	 * @var string
	 */
	const LINK_STATUS = 'status';
	
	/**
	 * Return translated label
	 * @return string Element Title
	 */
	public function code() {
		return $this->i18nParse('code');
	}
}
\Fox\Dao::infos(Type::className(),new \Fox\Object\Info('contact_interview_types', \Fox\Databases::DB_APP));

// Link to i18n elements
\Fox\Object\Links::add(\Fox\Dao::link(Type\I18n::className(),Type::LINK_SOURCE_REFERENCE)
->to(Type::className(), Type::LINK_I18N)
->on('type')
//->cache(new \Fox\Dao\MemoryCacheZone(\Fox\Dao\MemoryCacheZone::PERIOD_FOREVER,Type::cacheDirectory()))
->versionFrom());